{literal}
<script language="JavaScript">

//document.forms[1].elements[0].focus();

function addHosts()
{
	dnsRow = document.getElementById('dnsRecord');
  lastrow = dnsRow.rows[dnsRow.rows.length-1];
	newlastrow = lastrow.cloneNode(true);
	newlastrow.value = ""; 
	document.getElementById  
	dnsRow.insertBefore(newlastrow,lastrow);


	return false;
}

function cloneRow()
{
    oldRow =  document.getElementById('dnsRecord');
    var newRow = oldRow.cloneNode(true) ;
}


function changeFields()
{
	recordType = document.getElementById('rtypes') ; 
	document.getElementById('priority').readonly='readonly'; 
	
}
</script>


</script>
{/literal}
<center> 
<form id="dnsRecords" action="add.php" name="ipForm" METHOD="post"> 
<input type="hidden" name="mydomain" value={$mydomain}> 
<table width="70%"> 
<tr>
 <th> Record Type </th>
 <th> Priority </th> 
 <th> HostName </th> 
<th> Ip Address </th> 
<td>
<!--     <a href="#" onclick="return addHosts()">Add Another Record </a> --> 


</td>
</tr> 
<tbody id="dnsRecord"> 
<tr> 
<td align="center"> 
<select id="rtypes" name="rtypes[]" onChange='changeFields()'> 
    {html_options values=$rtypes options=$rtypes}
</select> 
</td>
<td align="center"> 
 <input id="priority" type="text" class="TextBox" name="priority[]"> 
</td>
 <td align="center"> 
 <input id="hostname" type="text" class="TextBox" name="hostname[]"> 
</td>
<td align="center"> 
 <input id="ipaddress" type="text" class="TextBox" name="ipaddress[]"> 
</td>

<td>
    <a href="#" onclick="return addHosts()">Add Record</a>


</td>

</tr>
</tbody> 
<tbody id="newDns"> 

</tbody> 


<tr>
<td> &nbsp; </td>
<td> &nbsp; </td> 

<td> <input type="submit" class="loginButton" value="Save Record(s) " > </td> <td> <input class="loginButton" type="reset" value="Reset"> </td> 
</tr> 
</table> 

{include file="previoushosts.html"} 
